The present invention relates to databases, and more particularly to data query to databases.
FIG. 1 illustrates one conventional system for managing data. The system 100 is known in the industry as the Content Manager system developed by International Business Machines, Corporation(trademark). The system 100 is a triangular client/server architecture, with the architecture comprising a client 102, a library server 104, and an object server 106. A client 102 sends a request to the library server 104. The library server 104 forwards the request to the object server 106 and responds to the client""s request. The object server 106 then responds to the library server""s request, delivering the requested digital data object to the client 102. The library server 104 uses a relational database to manage digital objects and provide data integrity. It maintains index information and controls access to objects stored on the object server 106. The library server 104 directs requests from the client 102 to update or query entries in the library catalog. The catalog contains object indexes and description information. The object server 106 is the repository for objects stored in the system 100. Users store and retrieve digital objects in the object server 106 by routing requests through the library server 104.
In order to properly access the objects stored at the object server 106, the index information at the library server 104 and the digital objects at the object server 106 must be properly synchronized. Errors occur when the index information at the library server 104 and the digital objects at the object server 106 become out-of-sync. This may occur with events such as power failures. With these errors, the client 102 is unable to reliably access the data.
To identify the errors, the object server 106 compares each data obtained by directly querying the library server 104 with the data at the object server 106. Conventionally, this comparison uses the C function, xe2x80x9cstrcmpxe2x80x9d, which is part of the American National Standards Institute (ANSI) standard. However, a problem occurs when the library server 104 uses a data platform which is not compatible with the xe2x80x9cstrcmpxe2x80x9d. For example, assume that the library server 104 and the object server both use the DB2(trademark) platform. The data from the library server 104 does not have a sort key compatible with xe2x80x9cstrcmpxe2x80x9d. The data at the object server 106 also does not have a sort key compatible with xe2x80x9cstrcmpxe2x80x9d. Thus, a conflict occurs when the comparison is attempted of these. The object server 106 can solve this problem for the data at the object server 106 by converting the data so that it is compatible with xe2x80x9cstrcmpxe2x80x9d, since the object server 106 is aware that it is using the DB2 platform. However, the object server 106 is not aware of the platform used by the library server 104. The object server 106 cannot determine whether or not the data returned by the library server 104 is compatible with xe2x80x9cstrcmpxe2x80x9d. Thus, the object server 106 cannot perform any proper conversions. A reliable comparison of the data cannot be made.
Accordingly, there exists a need for a utility for a cross platform database query. The present invention addresses such a need.
The present invention provides a utility for cross platform database query. In a preferred embodiment, the utility resides at an object server in a data system. The utility obtains a set of data items from a library server in the data system; places the set of data items from the library server in a temporary table at the object server; obtains each data item from the temporary table and the base object table; and converts each data item from the temporary table and the base object table, if a conversion is required, such that each data item from the temporary table and the base object table may be compared. Because the utility, the temporary table, and the base object table all reside at the same server, the utility knows whether or not to convert the data items so that a conflict free comparison is performed. In this manner, the utility need not actually know what platform is used by the library server, yet, data at the library server and the object server can be properly compared.